<?php if(!defined('DB_NAME')) die();
if( ( !ismobile() || ismobile() && get('ini_mside') ) && ( get('ini_layout')!="关闭侧栏" && !is_page() ) ){
	global $wp_registered_sidebars;
	echo '<aside id="sidebar">';
	if( is_home() ){
		if( !dynamic_sidebar('sidebar-1') ) echo "<div class=widget><h3>请到后台添加：<a href=/wp-admin/widgets.php rel=external>".$wp_registered_sidebars['sidebar-1']['name']."</a></h3></div>";
	}
	if( is_archive() || is_search() ){
		if( !dynamic_sidebar('sidebar-2') ) echo "<div class=widget><h3>请到后台添加：<a href=/wp-admin/widgets.php rel=external>".$wp_registered_sidebars['sidebar-2']['name']."</a></h3></div>";
	}
	if( is_single() && !get('ini_single') ){
		if( !dynamic_sidebar('sidebar-3') ) echo "<div class=widget><h3>请到后台添加：<a href=/wp-admin/widgets.php rel=external>".$wp_registered_sidebars['sidebar-3']['name']."</a></h3></div>";
	}
	echo '</aside>';
}